package com.zhidisoft.crm.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.zhidisoft.crm.entity.SysFunction;
import com.zhidisoft.crm.entity.SysUser;

public interface ISysLoginMapper {

	@Select("select * from sys_user where username=#{username}")
	SysUser password(String username);
	
	@Select("select sf.* from sys_function sf join sys_role_func srf on sf.id=srf.func_id join sys_role sr on srf.role_id=sr.id join sys_user_role sur on sr.id=sur.role_id join sys_user su on sur.user_id=su.id where su.username=#{username}")
	List<SysFunction> functions(String username);
}
